<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <title>Welkom op Geoplaza! DE site voor Geostudenten!</title>
       	<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
        <link rel="stylesheet" href="stylesheets/screen.css" type="text/css" media="screen" />
        <link rel="stylesheet" href="stylesheets/werkgever.css" type="text/css" media="screen" />
        <link rel="stylesheet" href="stylesheets/student.css" type="text/css" media="screen" />
        <script type="text/javascript" src="javascript/jquery-1.6.1.js" ></script>
        <script type="text/javascript" src="javascript/home.js" ></script>
        <script type="text/javascript" src="javascript/enroll.js"></script>
        <script type="text/javascript" src="javascript/utils.js"></script>
    </head>
    <body>
        <!-- Put as much html in here as possible -->
        <?php 

            // require the correct file paths;
            require_once("../includes/paths.php");

            // check for content that needs to be loaded given through the URL
            $page = (empty($_GET['p'])) ? "home" : $_GET['p'];

            // When type get 't' is empty, it is HOME. 
            $type = (empty($_GET['t'])) ? "HOME" : strtoupper($_GET['t']);

            // Make the var in combination with the _PATH addition a constant, so the defined path from paths.php can be read
            $path = constant($type."_PATH");

            // require the master navigation bar 
            require_once( LIB_PATH."masterhead.php"); 
            
        ?>
        
        <!-- start content wrap, here comes the content that is required throughout the site -->
        <div id="wrap"> 
            <div id="header">
            </div>
            
            <?php
            // require the navigation bar which needs to be in the wrap
            require_once( LIB_PATH."nav.php");

            // check for which site fragment needs to be loaded and to which folder
            if (file_exists($path.$page.".php")) {
                require_once($path.$page.".php");
            }
            else {
                require_once($path."error.php");
            }
            // require the needed footer.
            require_once(LIB_PATH."footer.php"); 

            ?>
            
        </div> <!-- End wrap -->
    </body>
</html>
